hysop.core.memory.allocator module¶
- class hysop.core.memory.allocator.AllocatorBase(verbose, **kwds)[source]¶
Bases:
TaggedObject
Base class for allocators.
Initialize a TaggedObject with a tag prefix/postfix/formatter, all optional.
- __call__(size, alignment=None)[source]¶
Allocate nbytes aligned on min_alignment. If the first allocation fails, call the garbage collector and try again. It this fails a second time, raise a MemoryError.
- abstract allocate(nbytes, verbose=True)[source]¶
Allocate nbytes bytes of memory. No minimal memory alignment is guaranteed. If allocation fails, this method has to raise a MemoryError.
- is_deferred = False¶